<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="onein" uri="http://www.onein.cn/jsp/taglib"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>会员服务 | 万应教育</title>
<jsp:include page="/WEB-INF/inc/meta.jsp"/>
<link href='<onein:url value="/styles/all.css"/>' type="text/css" rel="stylesheet" />
<script src="<onein:url value="/scripts/shareaction.js"/>" type=text/javascript></script>
<script src="<onein:url value="/scripts/jquery.js"/>" type="text/javascript"></script>
<script src="<onein:url value="/scripts/order.js"/>" type="text/javascript"></script>
<script src="<onein:url value="/scripts/memberservice.js"/>" type="text/javascript"></script>
</head>

<body>
<div class="lockBobyDiv" id="lockBodyDivId" style="display:none;"">
</div>
    <jsp:include page="/WEB-INF/inc/header.jsp"/>
    <jsp:include page="/WEB-INF/inc/menu.jsp"/>
    
     <div id="bodyWrap">
        <jsp:include page="/WEB-INF/inc/centerSidebar.jsp"/>
        <div class="personalRightWrap">
          
          <div class="memberServiceDiv"><!--正常状态css为regSelectAgesNormal-->
   		    <div>
   		               会员服务内容文本会员服务内容文本会员服务内容文本会员服务内容文本会员服务内容文本会员服务内容文本
   		    </div>
   		    <div <c:if test="${MEMBERSTATUS != null}">style="display:none"</c:if> >
   		      <span class="memberServiceWTitle">您还没有购买会员服务.</span>          
   		      <a href="<onein:url value="/center/memberRenew" />?type=ORDER" class="botton1 memberServiceToolsBt" >
                 <span>订购服务</span>
              </a>
             </div>
             
   		    <div <c:if test="${MEMBERSTATUS == null || MEMBERSTATUS == false}">style="margin-top:10px;display:none"</c:if> >
   		      <span class="memberServiceWTitle">您的会员服务还有${SUBDAYS}天到期 .</span>          
   		      <a href="<onein:url value="/center/memberRenew" />?type=RENEW" class="botton1 memberServiceToolsBt" >
                 <span>会员续订</span>
              </a>          
   		    </div>
   		    
   		    <div <c:if test="${MEMBERSTATUS == null || MEMBERSTATUS == true}">style="margin-top:10px;display:none"</c:if> >
   		      <span class="memberServiceWTitle"> 您的会员服务已经过期 .</span>          
   		      <a href="<onein:url value="/center/memberRenew" />?type=RENEW" class="botton1 memberServiceToolsBt" >
                 <span>会员续订</span>
              </a>           
   		    </div>
          </div>  
          
          <div class="memberServiceDiv" style="height:420px"><!--正常状态css为regSelectAgesNormal-->
            <div><h2>订单明细</h2></div>
            <c:if test="${empty orders}">
              <div class="contentBody"><br/>抱歉，没有查询到相关订单! </div>
            </c:if>
            
            <c:if test="${!empty orders}">
             <table width="100%" border="0" >
                <tr>
                  <th></th>
                  <th>订单编号</th>
                  <th>订单状态</th>
                  <th>支付类型</th>
                  <th>金额</th>
                  <th>订单类型</th>
                  <th>订单日期</th>
                  <th></th>
                  <th></th>
                </tr>
                <c:forEach items="${orders }" var="order" varStatus="i">
                  <tr align="center" <c:if test="${i.index%2 == 0 }">style="background-color:"</c:if>>
                    <td ><a href="#" onclick="extendItem('${order.id}','<onein:url value="/images/onebit_32.png"/>','<onein:url value="/images/tabicons_149.gif"/>')" ><img id="${order.id}img" src='<onein:url value="/images/tabicons_149.gif"/>' width="15px" height="15px" /></a></td>
                    <td class="memberServiceColunm1">${order.orderNo }</td>
                    <td class="memberServiceColunm1">${order.orderStatus }</td>
                    <td class="memberServiceColunm1">${order.paymentType  }</td>
                    <td class="memberServiceColunm1">￥${order.amount }元</td>
                    <td class="memberServiceColunm1">${order.orderFrom }</td>
                    <td class="memberServiceColunm1">${order.orderDate }</td>
                    <c:forEach items="${order.items }" var="item">
                      <td><c:if test="${order.orderStatus == 'Create' }"><a href="javascript:submitPay('<onein:url value="/center/orderPay"/>?orderNo=${order.orderNo}&orderId=${order.id}','${item.name }','${item.price }');" class="botton1 memberServiceToolsBt"><span>立即支付</span> </a> </c:if></td>
                    </c:forEach>
                    <td><c:if test="${order.orderStatus == 'Create' && order.orderCancel == true}"><a href="<onein:url value="/center/cancelOrder"/>?orderNo=${order.orderNo}" class="botton1 memberServiceToolsBt"><span>取消订单</span> </a> </c:if></td>
                  </tr> 
                 
                  <tr id="${order.id}" style="display:none;background-color:#DEDEDE">
                    <td colspan="9">
                       <table width="70%">
                         <c:forEach items="${order.items }" var="item">
                          <tr>
                            <td>${item.name }</td>
                            <td>￥${item.price }元</td>
                            <td>${item.type }</td>
                          </tr> 
                         </c:forEach>
                       </table>
                    </td>
                  </tr>
                  
                
                </c:forEach>
                
             </table>
            </c:if>
          </div>
          
        </div>
         
    
    <jsp:include page="/WEB-INF/inc/footer.jsp"/>
    </div>
    
    <div class="regUpWrap" id="registerDivId" style="display:none;text-align:center;">
<div class="shadow1">
<div class="shadow2">
<div class="popUpWrapInside" >
      <table align="center" width="100%">
                <tr><th align="center" colspan="2" height="40">您选择的会员服务</th></tr>
                <tr>
                  <td align="right" width="30%">名称:</td>
                  <td align="left" id="confirmProductName" align = "left"></td>
                </tr>
                <tr height="40">
                  <td  align="right" width="30%">金额:</td>
                  <td id="confirmProductPrice" align = "left"></td>
                </tr>
                <tr align="center">
                  <td colspan=2 align="center">
                    <a href="<onein:url value="/center/memberService"/>" class="reg2botton2"><span>已经支付成功</span></a>
                    <a href="<onein:url value="/center/memberService"/>" class="reg2botton2"><span>支付遇到问题</span></a>
                  </td>
                </tr>
              </table>
      <div class="ca"></div>
  </div>
  </div></div></div>
    
</body>
</html>